package ccmis.finance.capital.bo;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import jfox.platform.infrastructure.DataAccessObject;
import jfox.platform.infrastructure.SuperBO;

import ccmis.finance.capital.dao.InterestRateDAO;
import ccmis.finance.capital.entity.InterestRate;

/**
 * @author <a href="mailto:ren.yingb@gmail.com">Ren Yingbo</a>
 */
@Stateless
@Local
public class InterestRateBOBean extends SuperBO implements InterestRateBO{
	
	@EJB
	InterestRateDAO interestRateDAO;

	public void deleteInterestRate(long id) {
		interestRateDAO.deleteInterestRate(id);   	
	}

	public List<InterestRate> getAllInterestRates() {
      return interestRateDAO.getAllInterestRates();
	}

	public InterestRate getInterestRateById(long id) {
      return interestRateDAO.getInterestRateById(id);
	}

	public void newInterestRate(InterestRate interestRate) {
		interestRateDAO.insertInterestRate(interestRate);
	}

	public void updateInterestRate(InterestRate interestRate) {
		interestRateDAO.updateInterestRate(interestRate);	
	}
	
	public DataAccessObject getDataAccessObject() {
      return interestRateDAO;
	}

}
